package com.pro.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.pro.domain.Theather;
import com.pro.mapper.TheatherMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TheatherServiceImpl implements TheatherService {
    @Autowired
    private TheatherMapper theatherMapper;
    @Override
    public List<Theather> selectallMovie() {
        QueryWrapper<Theather> queryWrapper = new QueryWrapper<>();
        List<Theather> list = theatherMapper.selectList(queryWrapper);
        return list;

    }

    @Override
    public List<Theather> selectMovieByName(String theatername) {
        String name = "%"+theatername+"%";
        List<Theather> list = theatherMapper.selectByName(name);
        return list;
    }
}
